package com.web;

import com.pojo.dto.Message;
import com.pojo.vo.CTicketPlanVo;
import com.service.CTicketPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CTicketPlanController {
    @Autowired
    CTicketPlanService cTicketPlanService;

    @RequestMapping(value = "/cticketplans", method = RequestMethod.POST)
    public Message<List<CTicketPlanVo>> findList(CTicketPlanVo cTicketPlanVo) {
        return cTicketPlanService.list(cTicketPlanVo);
    }

    @RequestMapping(value = "/cticketplans/selectone", method = RequestMethod.POST)
    public Message<CTicketPlanVo> find(CTicketPlanVo cTicketPlanVo) {
        return cTicketPlanService.selectOne(cTicketPlanVo);
    }

    @RequestMapping(value = "/cticketplans/add", method = RequestMethod.POST)
    public Message<CTicketPlanVo> add(CTicketPlanVo cTicketPlanVo) {
        return cTicketPlanService.add(cTicketPlanVo);
    }

    @RequestMapping(value = "/cticketplans/update", method = RequestMethod.POST)
    public Message<CTicketPlanVo> update(CTicketPlanVo cTicketPlanVo) {
        return cTicketPlanService.update(cTicketPlanVo);
    }

}
